// import 'babel-polyfill' // 兼容ie8以上浏览器，zhanglognfei 2020.1.9
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import i18n from 'tap-ui/src/lang' // internationalization
import 'tap-ui/src/styles/common.scss'
import 'animate.css'
import App from './App'
import router from 'tap-ui/src/router'
import './router'
import store from 'tap-ui/src/store'
import './store'
import 'tap-ui/src/router/merge'
import 'tap-ui/src/icons' // icon
import './icons' // icon
import 'tap-ui/src/permission'
import 'tap-ui/src/filter'
import 'tap-ui/src/directive'
import 'tap-ui/src/utils/topscomm'
import TapUI from 'tap-ui'
import './styles/main.scss'
import 'tap-ui/src/fonts/tap-icon/iconfont.css'
import tlHelp from '@/components/help'
// 如果要修改系统名称
store.dispatch('ChangeWebSite', {
  indexTitle: '信息化组件库',
  firstPage: {
    // 默认系统首页
    title: '首页',
    value: '/test'
  }
})

Vue.use(ElementUI, {
  size: store.getters.size, // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})
Vue.config.productionTip = false

TapUI.install(Vue)
Vue.component(tlHelp.name, tlHelp)
store.dispatch('setDefaultSize', 'small')
store.dispatch('setElementIds', { app: 'tic' })
store.dispatch('closeSideBar', true)

new Vue({
  el: '#tic',
  router,
  store,
  i18n,
  render: (h) => h(App)
})
